package entities;

import java.util.Comparator;

public class TreeAssociationComparator implements Comparator<TreeAssociation> {

	@Override
	public int compare(TreeAssociation o1, TreeAssociation o2) {
		int c = o1.getParentCode().compareTo(o2.getParentCode());
		if(c == 0) {
			return o1.getChildCode().compareTo(o2.getChildCode());
		} else {
			return c;
		}
	}

}
